@import "../../../style/utils";

// book组件是否展开由user组件的状态决定，见user/style.scss
.panel{
    width: calc(100% - 290px);
    height: 100%;
    padding: 0 30px;
    transform: translateX(290px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform .52s cubic-bezier(0.0,0.0,0.2,1);
}

// 小屏幕不变换
@include mqsmall( '.panel', (
    width: 100%,
    padding: 0 15px,
    transform: translateX(0px)
));

.book{
    width: 214px;
    display: inline-block;
    border: 1px solid #e1e8ed;
    border-radius: 2px;
    margin: 10px 5px 0 5px;
    &:first-child{
        margin-top: 20px;
    }
}

@include mqfromto( '.book', '701px', '200px', (
    position: relative,
    display: block,
    width: 100%,
    height: 115px,
    margin: 0 0 10px 0,
    padding: 4px
))

.image{
    padding: 4px 0;
    margin: 6px;
    height: 200px;
    text-align: center;
    border: 2px solid #e1e8ed;
    border-radius: 2px;
    img{
        height: 100%;
        max-width: 100%;
    }
}

@include mqfromto( '.image', '701px', '200px', (
    padding: 0,
    margin: 0,
    float: left,
    height: 105px,
    width: 85px,
    margin-right: 6px
))

.libinfo{
    @extend .noselect;
    text-align: center;
    h3{
        padding: 35px 0;
        font-size: 20px;
        font-weight: 400;
        color: #5C676F;
        text-align: center;
    }
    div{
        display: inline-block;
        border: 1.8px solid #e5e5e5;
        border-radius: 4px;
        font-size: 14px;
    }
    table{
        width: 500px;
        border-collapse: collapse;
        color: #8A8A8A;
        thead{
            border-bottom: 1.8px solid #e5e5e5;
            th{
                padding: 6px 0;
                &:first-child{
                     border-right: 1px solid #e5e5e5;
                }
            }
        }
        tbody{
            tr{
                border-bottom: 1px solid #e5e5e5;
                &[data-combind="true"]{
                    border-bottom: none;
                }
                &:last-child{
                    border: none;
                }
                td{
                    text-align: center;
                    padding: 8px 0;
                    &:first-child{
                        border-right: 1px solid #e5e5e5;
                    }
                    &:last-child{
                        span{
                            text-align: center;
                            line-height: 1.6;
                        }
                    }
                    & > span{
                        display: inline-block;
                        text-align: left;
                    }
                }
            }
        }
    }
}

@include mqsmall('.libinfo div', (
    display: block
))
@include mqsmall('.libinfo table', (
    width: 100%
))

.bookbase{
    position: relative;
    margin: 15px 6px 0;
    white-space: nowrap;
    p{
        margin-bottom: 10px;
        color: #444;
        font-size: 15px;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    small{
        display: block;
        margin-top: 4px;
        color: #737373;
        text-overflow: ellipsis;
        overflow: hidden;
        min-height: 16px;
    }
}

@include mqfromto( '.bookbase', '701px', '200px', (
    margin-top: 0,
    font-size: 18px
))
@include mqfromto( '.bookbase p', '701px', '200px', (
    font-size: 16px
))

.more{
    text-align: center;
    margin: 10px 0;
    button{
        background-color: #ebebeb;
        border: 1px solid #e1e1e1;
        border-radius: 3px;
        color: #505e69;
        cursor: pointer;
        width: 100px;
        padding: 6px 10px;
    }
}

@include mqfromto( '.more', '701px', '200px', (
    position: absolute,
    top: 0,
    left: 0,
    width: 100%,
    height: 100%,
    margin: 0,
    opacity: 0
))

@include mqfromto( '.more button', '701px', '200px', (
    margin-top: 0,
    width: 100%,
    height: 100%
))

.part{
    margin: 30px 0 30px 5px;
    background: #f9f9f9;
    box-shadow: 1px 2px 3px #ddd;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    position: relative;
    height: 38px;
    overflow: hidden;
    padding: 0 82px;
    max-width: 700px;
    @extend .noselect;
    &[data-pdbefore="true"]{
        padding-left: 0;
    }
    &[data-pdafter="true"]{
        padding-right: 0;
    }
}

@include mq('.part', '700px', (
    margin-left: 0,
    padding: 0,
    max-width: 100%
))

.partNum{
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    &[data-cur="false"]:hover, &[data-step]:hover{
        background-color: #4285f4;
        color: #fff;
    }
    &[data-cur="true"]{
        color: #4285f4;
        cursor: default;
    }
    &[data-step]{
        position: absolute;
        top: 0;
        background-color: #f9f9f9;
    }
    &[data-step="before"]{
        left: 0;
        border-radius: 3px 0 0 3px;
    }
    &[data-step="after"]{
        right: 0;
        border-radius: 0 3px 3px 0;
    }
}

@include mq('.partNum[data-cur="false"]', '700px', (
    display: none
))
